import os
import re

files_ = os.listdir('/data/NS/data')
tm_file = open('/data/NS/timestamps.txt', 'w')

for file in files_:
    tmstamp = re.split(r'[._]', file)[-3]
    tm_file.write(tmstamp + "\n")
